package org.erp.store.service.impl;

import org.erp.common.page.PageQueryModel;
import org.erp.store.infrastructure.convert.DeviceInventoryConvert;
import org.erp.store.domain.bo.DeviceInventoryBo;
import org.erp.store.domain.dto.DeviceInventoryDto;
import org.erp.store.domain.vo.DeviceInventoryDetailsVo;
import org.erp.store.domain.vo.DeviceInventoryVo;
import org.erp.store.service.DeviceInventoryLogicService;
import org.erp.store.service.DeviceInventoryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
/**
 * 设备库存逻辑查询服务实现类
 */
@Service
public class DeviceInventoryLogicServiceImpl implements DeviceInventoryLogicService {

    @Resource
    private DeviceInventoryService deviceInventoryService;
    @Resource
    private DeviceInventoryConvert deviceInventoryConvert;

    @Override
    public PageQueryModel<DeviceInventoryVo> getListByPage(DeviceInventoryBo deviceInventoryBo) {
        DeviceInventoryDto deviceInventoryDto = deviceInventoryConvert.boConvertDto(deviceInventoryBo);
        return deviceInventoryService.getListByPage(deviceInventoryDto);
    }

    @Override
    public DeviceInventoryDetailsVo getDetailsByCode(String productCode) {
        return deviceInventoryService.getDetailsByCode(productCode);
    }
}
